// 微软翻译
if(location.hash && location.hash!='' && location.hash!='#en'){
	$("#tsign").show();
	$(function(){
		$(".flag").each(function(){
			$(this).attr("href","javascript:;");
		});
	});
	$.getScript('http://www.microsofttranslator.com/ajax/v3/WidgetV3.ashx?siteData=ueOIGRSKkd965FeEGM5JtQ**&ctf=true&ui=true&settings=Manual&from=',function(){
		$(document).on("click",".flag",function(){
			if($('#WidgetFloaterPanels,#MicrosoftTranslatorWidget,[translate="no"]').size()>0){
				var $this=$(this);
				if(!$("#WidgetFloaterPanels").attr("len")){
					$("#LauncherTranslatePhrase").click();
					loop002_=setInterval(function(){
						if($("#WidgetFloaterPanels").attr("len")){
							clearInterval(loop002_);
							$this.trigger('click');
						}
					},200);
				}
				if($("#WidgetFloaterPanels").attr("len") && "undefined" != typeof(LanguageMenu)){
					var lan_0=$(this).attr("class").replace("flag ","");
					LanguageMenu.onclick(lan_0);
					location.href='#'+lan_0;
					$("[href]:not(.flag)").each(function(){
						if($(this).attr("href").indexOf("/")>=0){
							$(this).attr("href",$(this).attr("href").split("#")[0]+"#"+lan_0);
						}
					});
					loop003_=setInterval(function(){
						if($("[lang='"+lan_0+"']").size()>0){
							clearInterval(loop003_);
							$("#tsign").hide();
						}
					},100);
				}
			}
		});
		$(function(){
			loop001_=setInterval(function(){
				if($("#LauncherTranslatePhrase").size()>0){
					clearInterval(loop001_);
					if(location.hash && location.hash!=''){
						$(".flag"+location.hash.replace('#','.')).trigger("click");
					}else{
						$(".flag.en").trigger("click");
					}
				}
			},200);
		});
	});
	$(document).on("mouseenter","[len][lang]",function(){
		$(this).removeAttr("style");
	});
}